package db

import (
	"ginweb/internal/domain/order"
	"ginweb/internal/domain/product"
	"ginweb/internal/domain/user"
	"log"
)

func Migrate() {
	// Migrate your models here
	if err := DB.AutoMigrate(&user.User{}, &product.Product{}, &order.Order{}); err != nil {
		log.Fatalf("Failed to migrate database: %v", err)
	}
	log.Println("Database migrated successfully")
}
